#ifndef INFINITY_FLY_BY_H
#	define INFINITY_FLY_BY_H

#include "gamemode.h"

#include "graphics/node.h"
#include "graphics/mesh.h"
#include "graphics/camera.h"
#include "graphics/renderer.h"
#include "graphics/indexbuffer.h"
#include "graphics/vertexbuffer.h"
#include "graphics.opengl/vertexbuffer.h"

#include "cellclustermanager.h"
#include "inputs/command.h"
#include "worldgridmanager.h"

#include "planet.h"
#include "planetcell.h"
#include "planetitem.h"


#include "collectibleentity.h"
#include "charactereentity.h"
#include "grenadeentity.h"

#include "itementity.h"


#include "spellbar.h"
#include "inventaire.h"


namespace infinity {

	namespace physics {

class Object;

	} // namespace physics

class FlyBy
:	public GameMode
{
public :

	class Cell;


public : //! @name Construction & Destruction
	//! @{
	FlyBy();
	~FlyBy();
	//! @}

public : //! @name Commands
	//! @{
	void install();
	void update(const dw::float32 deltaT);
	void render();
	void term();
	//! @}
	
private : //! @name Helpers
	//! @{
	//! @}

private : //! @name Data
	//! @{
	dw::graphics::Renderer::State m_customState;

	dw::inputs::InputCommand m_changeLightingMode;
	dw::inputs::InputCommand m_save;

	dw::inputs::InputCommand m_camDebug;
	dw::inputs::InputCommand m_camFps;

	dw::inputs::InputCommand m_leftClick;
	dw::inputs::InputCommand m_rightClick;
	
	dw::inputs::InputCommand m_chooseBlock;
	dw::inputs::InputCommand m_spawnEntity;
	dw::inputs::InputCommand m_grenadeEntity;

	dw::inputs::InputCommand m_buildaction;
	dw::inputs::InputCommand m_inventaireaction;

	dw::inputs::InputCommand m_dropAll;

	bool m_build;
	bool m_showInventaire;

	render::SpellBar* m_pSpellBar;
	render::Inventaire* m_pInventaire;

	dw::byte m_blockType;

	//test
	float m_LapsTimeDelete;
	float m_TimeDelete;
	Vector3i lastCellIdPicked;

	bool m_highlight;
	Vector3f m_intersectedCell;

	CharactereEntity* m_entity;
	//! @}
};

} // namespace infinity

#endif // !INFINITY_FLY_BY_H
